package com.czq.controllor;

import com.czq.common.Result;
import com.czq.execption.BusinessEXception;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

@RestControllerAdvice
public class Excepecions {

    @ExceptionHandler(BusinessEXception.class)
    public Result  Employeee(BusinessEXception ex){

        return  Result.error(ex.getMessage());
    }
}
